import request from '@/utils/request'

const knowDatasetApi = {
    /**
     * 数据列表
     */
    lists(params: {
        page_no?: number;
        page_size?: number;
        keyword?: string;
        status?: number;
    }): Promise<any> {
        return request.get({
            url: '/agent/know/dataset/lists',
            params
        })
    },

    /**
     * 数据列表
     */
    detail(uuid: string): Promise<any> {
        return request.get({
            url: '/agent/know/dataset/detail',
            params: {
                uuids: uuid
            }
        })
    },

    /**
     * 数据删除
     */
    delete(uuids: string[]): Promise<any> {
        return request.post({
            url: '/agent/know/dataset/delete',
            params: { uuids }
        })
    },

    /**
     * 失败重试
     */
    retry(uuids: string[]): Promise<any> {
        return request.post({
            url: '/agent/know/dataset/retry',
            params: { uuids }
        })
    }
}

export default knowDatasetApi
